Overview

DEKSI Network Inventory is a unique software program that is designed to provide a detailed and comprehensive listing of the software and hardware on your networked p.c.’s.  With Cost of Ownership so very important having a detailed audit of your network whenever you request it is absolutely vital to your organization. DEKSI Network Inventory is designed to accomplish this is a quick and easy manner so you can have all the information at your fingertips within seconds! DEKSI Network Inventory has frequent updates, every four to six weeks, and these updates are free for our customers. All of the new features we add are 100% based on customer’s suggestions, ideas, and requests. Please do not hesitate to send us your ideas and requests, as well as your critical comments, as our goal is to make this program the finest inventory tool available. With DEKSI Network Inventory our customers always and forever will be number one!

With DEKSI Network Inventory, the Network Administrator will have the most recent information about all of the installed hardware and software components on all of the computers installed across the network, along with detailed and comprehensive reports.  If there is a report you would like customized to your organization please send us a detailed email describing exactly what you need and your requirements and a member of our tech support and development staff will respond to your request promptly.

A word about DEK Software International.............. DEK Software International began business in 1988 and markets software products from around the world.  Based in the United States, we have thousands of customers in more than forty different countries on every continent.

DEKSI Network Inventory will list the following data for you:

•	Processors: displays the name of the processor and its current speed, the vendor, serial number, family, model, type, external clock, and a variety of other features.  Please note that not all hardware vendors make this information available and DEKSI Network Inventory will collect this data if it is readily available.

•	Memory: Will display the physical memory, virtual memory size, page file size, memory page size, the memory controller properties, as well as information about the memory slots.

•	List of Software: will display the name and uninstall path for all of the software on the computers you are inventorying.

•	BIOS: displays the very important information about the BIOS version, manufacturer, .release date, size.

•	DB Engines/DirectX: displays the database engine names and versions, as well as the DirectX driver names, devices.

•	Motherboard and Chassis: displays the motherboard name, serial number, version, the chassis model, manufacturer, version and serial number, the cache information.

•	Autorun: displays the name, command, and start section for all autorun applications on the workstation.

•	Machine Data: displays the computer product name, vendor name, serial number, product version.

•	Environmental Data: display all the environment data that is on an inventoried workstation.

•	Video Data: displays the display resolution, refresh rate, video BIOS version, video adapter name, supported video modes, the monitor physical size, resolution and name.

•	Printers: displays the name, port of every printer on the computer, and whether the printer is shared or on a remote server.

•	Network Data: displays the name, type, physical address, IP addresses of all the network adapters on the machine, information about network protocols, services, clients, the TCP/IP host name and domain name, IP addresses of that machine, information about DNS servers, winsocks.

•	Devices: displays the name, friendly name, description, GUID, manufacturer name, location, PCI number, device number and lot of other parameters for every device on that computer.

•	Disk Drives: displays the name, capacity, type, serial number, cylinder count, and other information for all physical disks, information about the logical partitions, the drive letter, type, total size and free space, UNC name, volume label of all mapped logical disks on the workstation.

•	Users: displays the name, full name, comments, profile, privileges, local and global groups for all user accounts on that computer, information about user group also.

•	Shared resources: displays the name, comments, local path, share type for every shared resource on the machine.

The Network Administrator can quickly view and print comprehensive reports using DEKSI Network Inventory:

Disk Drives

General Workstation

Hotfixes Total

Hotfixes Installed

Internet Explorer

Memory

Monitor

Motherboard

Operating Systems

Processors

Software Installed

Software Licenses

DEKSI Network Inventory allows the Network Administrator to preview, print the reports or convert them into a wide variety of different file formats:

•	HTML

•	XML

•	RTF

•	Word

•	And a wide variety of other MS Office file formats.


How to Begin

DEKSI Network Inventory consists of two parts: The Client Component (invClient.exe) and the Administrator's Component (Admin.exe). To use DEKSI Network Inventory on your local area network, you should:

Configure all of the workstations to run the invClient.exe application. The simplest way to do this is to place the Client files in a public shared folder and add the invClient.exe command to the user's logon scripts.

Configure the invClient.exe module to extract the users workstations data to a folder that can be  accessed by the Network Administrator.

Configure the Admin.exe Administrator's module to read the users workstation data from this folder.


Installation and setup

Download the dni.exe file from our website and install it on your hard drive.

Create a folder on a shared server disk and name it DNI. This folder will contain the DEKSI Network Inventory executable file, its configuration file and all of the important data files that list the information about the user's computers installed on the network.

Run Admin.exe, click File|Preferences and denote the path to the folder that has been created in the "Path to data files folder" option. Please use UNC names only in this option.

Copy the invClient.exe, xpkey.exe and sA.DLL files to the previously created folder. Add the invClient.exe launch command to the user's logon scripts.


How DEKSI Network Inventory works

When a user logs into the network, the logon process executes the logon script specified for this user. This logon script launches the invClient.exe application that collects important data about the user's computer and writes this data to the COMPUTERNAME.XML file in a shared data folder. When the Network Administrator begins the Admin.exe module, the program reads the user information files from the data folder and displays the data in a detailed and comprehensive manner.


Administrator

The Administrator program component is designed to view the data collected by the Network Administrator in a simple, quick, and easy to understand manner. Once the Admin.exe begins an Administrator main window is shown.

The window is split into two different parts: a network tree (on the left) and a SysInfo listing (on the right).

The network tree contains the names of workstations installed across the network, where the file invClient.exe was properly installed.

To view the data that has been inventoried:

1.	Click on the user workstation in the network tree.

2.	Select the menu item in the SysInfo submenu or click on the button of the toolbar.

3.	The inventory information will be listed in the SysInfo view.

You can preview this information, print it or export it to a variety of different file formats.

To print the inventory information page, select File|Print or click the toolbar button.

To preview the page, select File|Preview or click on the toolbar button. A preview window will then be displayed. In the preview window you can print the page or export it to a variety of different file formats. To print the page select File|Print or click on the toolbar button of the preview window. To export the page to different formats please select File|SaveAs and choose the required file format in the opened Save dialog.

To export the page to other file formats select File|Preview or click on required toolbar button. A preview window will be displayed. To export the page to other file formats select File|SaveAs and choose the required file format in the opened Save dialog.


Find Computer

You can search computers in the asset list by their names. To do this, select  Tool|Find Computers and print computer name you would like to find. The program will select the computer.


List dead computers

You can list dead workstation and delete them from the asset list. To do this, select Tools|List Dead Computers. In the displayed window choose time period to list the inventory information of which has not being updated this time.

You can choose last week, last month or any other starting date.

If you want to delete dead computers from the asset list check them and click on Delete Selected button


Software licenses

With DEKSI Network Inventory the Network Administrator can quickly and easily list the total number of software licenses the company owns. To the software licenses select the menu item Software Licenses. The Software Licenses page will be displayed.

To refresh the information about installed software on the network computers of the company you need to select Tools|List Software Licenses menu item. The Network Administrator needs to manually enter the number of legal licenses the company owns for every software title. Once the Network Administrator enters the software license number they can generate a report that displays the difference between the number of licenses the company owns for every title and the number of installations for every software product actually found.


Using the Reports

This inventory tool contains a wide variety of comprehensive reports and these reports are all easily printable:

•	Disks  lists the physical disk name, total capacity, revision, serial number, the logical disk name, type, file system, free and total space for all network machines.

•	General Workstation contains the processor name, speed, total physical memory, total disk space, free disk space, operating system and version, IP addresses, computer name.

•	Hotfixes Total contains a number of installed hotfixes and hotfixes not installed.

•	Hotfixes Installed lists installed hotfix names for every computer.

•	Hotfixes Not Installed lists hotfix names for each computer that are not installed.

•	Internet Explorer groups user workstations by the version of Microsoft Internet Explorer that is installed.

•	Monitor groups your machines by the monitor that is installed.

•	Motherboard groups your machines by the motherboard that is installed.

•	Monitor groups your machines by the monitor that is installed.

•	Operating Systems Report groups user workstations by the operating systems they run.

•	Processors Report groups network computers by the type of the central processor installed.

•	Software Installed groups your machines by the software that is installed.

•	Software Licenses groups the installed software depending on a count of software installations and a count of software licenses your company owns.

•	Software Installed groups your machines by the software that is installed and displays a count of the installed software.

•	Video Adapter groups your machines by the video adapter that is installed.

To preview the reports select the menu item in the Reports submenu and check the computers you want to include in the report. Once you click Ok the preview window will be opened.

You can print the report or export it to other different file formats.

To print the report select File|Print or click on required toolbar button of preview window.

To export the report to other file formats select File|SaveAs and choose the required file format in the opened Save dialog.


Exporting Data

Exporting to MS Access

To export inventory data to Access:

1. Run Access and create a new database.

2. Run DNI and select the Tools|Export data menu item.

3. Check computers you want to export to Access and click on the Generate

button.

4. Select “MS Access Database” and click on the Next button.

5. Select the "Export data to an SQL database via ODBC" option.

6. Specify "MS Access database" in the "Select an ODBC datasource"

option.

7. Specify the path to the previously created Access database file in

the "Enter database filename" option.

8. Click Next.

Exporting to MS Excel

To export inventory data to Excel:

1. Run Excel and create a new Excel spreadsheet.

2. Run DNI and select the Tools|Export data menu item.

3. Check computers you want to export to Excel and click on the Generate

button.

4. Select “MS Excel spreadsheet” and click on the Next button.

5. Select the "Export data to an SQL database via ODBC" option.

6. Specify "MS Excel spreadsheet" in the "Select an ODBC datasource"

option.

7. Specify the path to the previously created Excel file in

the "Enter database filename" option.

8. Click Next.

Exporting to ODBC/SQL

To export inventory data to ODBC-compatible data source:

1. Run SQL server and create a new database.

2. Run DNI and select the Tools|Export data menu item.

3. Check computers you want to export to SQL Server and click on the Generate

button.

4. Select “Any ODBC-compatible datasource” and click on the Next button.

5. Select the "Export data to an SQL database via ODBC" option.

6. Specify your SQL server in the "Select an ODBC datasource"

option.

7. Specify the path to the previously created database file in

the "Enter database filename" option.

8. Click Next.


Department Tree Constructor

If you need information about a great many computers it is best to group the network computers in a company department structure rather then have all of computer names listed separately.

To construct the department structure in DEKSI Network Inventory:

o	Select Tools|Department Tree Builder. The Department Tree Builder/Constructor window will be opened. The window consists of two parts: department tree and the computer list.

o	Create new department folders in the department tree. Select the parent department in the department tree and click the New menu item or click the required toolbar button. In the opened window enter the new department name and click OK.

o	To assign network computers to the new department select it and check the computers in the computer list on the right. The computers you check will be assigned to the selected department.

Using the department tree you also have the capability of renaming or deleting a department folder.

Simply Click on the Department and select the required menu item or click on the required toolbar button of the Builder/Constructor window.


Client switches

The client program has a few different switches for starting invClient.exe to disable different inventories from happening. For example if you did not want the BIOS scan to take place you could run invClient.exe BIOS- or maybe you didn't want the BIOS and Network scan to take place you would run invClient.exe BIOS- NET-.

      Switches:

      cpu+ cpu- : On/Off Cpu report

      os+ os- : On/Off OS report

      mem+ mem- : On/Off Memory report

      soft+ soft- : On/Off Installed software report

      stup+ stup- : On/Off Startup programs report

      bios_n+ bios_n- : On/Off Bios report

      disp+ disp- : On/Off Video system report

      prnt+ prnt- : On/Off Printers report

      net+ net- : On/Off Network report

      dsk+ dsk- : On/Off Disks report

      strg+ strg- : On/Off Storage report

      mach+ mach- : On/Off Machine report

      acc+ acc-: On/Off User accounts report

      shr+ shr- : On/Off Shared resources report

      dvc+ dvc- : On/Off Devices report

      eng+ eng- : On/Off DB Engines and DirectX report

      stmenu+ stmenu- : On/Off Start menu report

      hotf+ hotf- : On/Off Hotfixes report

      insthf+ insthf- : On/Off Install hotfixes

      By default all reports are On.


Hotfix and Windows Update Inventory

DEKSI Network Inventory can work in conjunction with Microsoft Baseline Security Analyzer (MBSA) to inventory installed hotfixes and hotfixes not installed and Windows patches on the computers over the network.

What is Microsoft Baseline Security Analyzer

As part of Microsoft's Strategic Technology Protection Program, and in response to direct customer needs for a streamlined method of identifying common security misconfigurations, Microsoft has developed the Microsoft Baseline Security Analyzer (MBSA). Version 1.2 of MBSA includes a graphical and command line interface that can perform local or remote scans of Windows systems. MBSA runs on Windows Server 2003, Windows 2000, and Windows XP systems and will scan for common security misconfigurations in the following products: Windows NT 4.0, Windows 2000, Windows XP, Windows Server 2003, Internet Information Server (IIS) 4.0, 5.0, and 6.0, SQL Server 7.0 and 2000, Internet Explorer (IE) 5.01 and later, and Office 2000, 2002 and 2003. MBSA also scans for missing security updates for Windows NT 4.0, Windows 2000, Windows XP, Windows Server 2003, IIS, SQL, Exchange, IE, Windows Media Player, MDAC, MSXML, Microsoft VM, Office, Content Management Server, Commerce Server, Host Integration Server, and BizTalk Server.

MBSA System Requirements

•	Supported Operating Systems: Windows 2000, Windows Server 2003, Windows XP

System requirements are outlined in the readme.txt file that is included in the tool. More information is also available at http://www.microsoft.com/mbsa.

How to start inventory of hotfixes and Windows patches

1.	Download MBSA from http://www.microsoft.com/mbsa and install it.

2.	Open Program Files and copy mbsacli.exe in the earlier created DNI folder on a shared server disk.

3.	Download the mssecure.cab file used for the security updates check in MBSA V1.2 from the following Microsoft Web site: http://go.microsoft.com/fwlink/?LinkId=18922. When manually downloading the cab files, users should re-download on a regular basis, to ensure the most recent mssecure.cab file released by Microsoft is used in their machine scans. Microsoft releases updated versions of the mssecure file when new security bulletins are issued or updated. More information is also available at http://www.microsoft.com/technet/security/tools/Tools/mbsaqa.asp.

4.	Rename the downloaded CAB file to “mssecure.cab”.

5.	Place mssecure.cab in the DNI folder on a shared server disk.

Once you have downloaded and installed MBSA DEKSI Network Inventory can import MBSA data to display them in an easy and understandable way.


Hotfix Deployment

After MBSA has been successfully downloaded and installed, DEKSI Network Inventory can help the System Administrator install Microsoft hotfixes on all the client computers.

To do this:

1. Open the DNI folder (you created earlier) on a shared server disk.

2. Create a new subfolder in this folder and name it Hotfixes.

3. Visit the Microsoft website to search and download hotfixes.

4. Download the required hotfixes.

5. Copy the downloaded hotfixes into the previously created subfolder.

After invClient.exe has started it checks the existence of hotfixes not installed in the Hotfixes subfolder. If invClient.exe finds a required hotfix in this subfolder, it installs the hotfix on the client machine.

Some hotfixes may require administrator’s rights to install them.

After invClient.exe has installed hotfixes on a client computer, the System Administrator may verify that the hotfixes have been installed. To do this start Admin.exe, select a required client computer and select the “SysInfo|Hotfixes (with MBSA)” menu item. DEKSI Network Inventory will display the installed hotfixes and hotfixes not installed.


General Data

Lists data about the workstation installed on the network:

Operating System

Name

Version

Service Pack

Registered to

User name

Localization

Installed hotfixes

Processor and memory

Processor

Physical memory

Computer serial number

Disk resources

Drive letter

Processor

List in detail important information about the processors for every workstation on the network:

Name

Vendor

Current speed

Frequency

External clock

Serial number

Family

Model

Stepping

Vendor Id

Brand Id

Socket designation

Voltage

Processor type

Processor upgrade

Level 1 cache data size

Level 1 cache code size

Level 2 cache size

Level 3 cache size

Feature flags:

Built-in FPU

Virtual mode extensions

Debugging extensions

Page size extensions

Time stamp counter

Model specific registers

Physical address extension

Machine check Exception

CMPXCHG8B instruction supported

On-Chip APIC Hardware supported

Fast fystem call

Memory type range registers

Page global extension

Machine check architecture

Conditional move instruction supported

Page attribute type

36bit page size extension

Processor serial number is present and enabled

CLFLUSH instruction supported

Debug store

Thermal monitor and software controlled clock facilities (ACPI)

Fast floating point save and restore

Streaming SIMD extensions

Streaming SIMD extensions 2

Self-snoop

Hyper-treading technology

Thermal monitor supported

Intel Architecture MMX technology supported

Enhanced MMX extensions

3D Now! Extensions

Enhanced 3D Now! extensions

Memory

Lists all of the data regarding the physical memory for every machine on the network:

Windows memory information

Physical memory

Virtual memory

Page file size

Page size

Memory controller

Memory module voltage

Memory Slot Count

Maximum Memory Module Size

Maximum capacity

Supported memory types

Supported speeds

Supported interleave

Current interleave

Memory slots

Socket designation

Type

Installed size

Speed

Network

List in detail important information about the Network for every workstation:

Network Physical Adapters

Network Virtual Adapters

Network Protocols

Network Services

Network Clients

TCP/IP

Host name

Domain name

IP addresses

Node Type

Primary DNS Suffix

DNS servers

Winsock

Description

Version

Status

Operating System

Lists the following information about the operating system for every workstation on the network:

Name

Version

Version name

Service Pack major version

Service Pack minor version

Registered Organization

Registered User

Localization

Product ID

Product Key

Default browser

Default mail client

Proxy Enable

Internet Explorer version

Installed hotfixes

Installed Suites

Time zone

Time zone

Standard name

Standard bias

Daylight name

Daylight bias

Locale Info

Abbreviate country code

Abbreviate language code

Country code

Currency decimal digits

Full country code

Full english language name

Full localize language name

Intl monetary symbol

Local monetary symbol

Positive currency mode

Negative currency mode

Currency decimal separator

Currency thousand separator

Decimal separator

Number of decimal digits

List separator

Date separator

Long date order

Short date order

Short date format

Time format

Time format specifier

Year format

Measurement system

Folders

Environment variables

BIOS

Lists the BIOS information for every computer installed on the network:

General BIOS information

BIOS manufacturer

BIOS version

BIOS release date

BIOS size

Engines/DirectX

Lists the following data about the installed engines and DirectX for all every computer that is installed on the network: the DB engine name, version, the driver name,  the DirectX device name.

Motherboard and Chassis

Lists the following data about the motherboard for all computers on the network:

Motherboard

Manufacturer

Serial number

Version

Chassis

Model

Manufacturer

Version

Serial number

Caches

Socket designation

Type

Associativity

SRAM type

Size

Max Size

Speed

Port connectors

Type

Internal designation

Internal connector

External designation

External connector

System slots

Type

Data bus

Current usage

Length

Machine Data

List the following information about every machine on the network:

Product name

Vendor name

Serial number

Product version

Video

Lists the following information about the video subsystem:

Display

Resolution

Refresh rate

Color depth

Font resolution

Video BIOS

Version

Release date

Video Adapter

Chipset

Memory on board

Video modes

Printers

Lists the information about the printer name, printer port, whether default/no for every printer that is installed on the network.

Devices

Lists the following information for every device of all machines on the network:

Name

Friendly Name

Description

GUID

Manufacturer

Location

PCI Number

Device Number

Function Number

Device Parameters

Driver

Driver Date

Driver Version

Driver Provider

Inf file

Service

Service name

Service group

Registry key

Resource key

Resource value

Disk

Lists the following information for every physical and logical disk of all machines on the network:

Physical Disks

Media Type

Serial Number

Model Number

Cylinder Count

Tracks Per Cylinder

Sectors Per Track

Bytes Per Sector

Capacity

Partitions

Partition Number

Partition Type

Size

Boot Indicator

Logical Disks

Volume Label

Disk Type

File System

Serial Number

Total size

Free size

Bytes per sector

Sectors per cluster

Total clusters

Free clusters

UNC name (network drives only)

User Accounts

Lists the following information about user accounts and user groups:

User accounts

Full name

User comment

Account comment

Profile

Script path

Home directory

Home dir drive

Logon server

Password age

Password expired

Account expired

Last logon

Last logoff

Workstations

Code page

Privileges

Local groups

Global groups

User groups

Comment

Shared Resources

Lists the following information about the shared resources on the p.c.:

Share type

Local path

Comment


Report Builder

Report Builder is a powerful tool for giving a DNI user the ability to generate reports quickly and efficiently. The built-in macro interpreter provides a Pascal-like macro language for performing complex data processing. The built-in dialog designer lets you create customized forms that among other uses can be used to set report parameters before printing.

Every report of Report Builder consists of bands. There are the following kinds of bands:

•	Report title;

•	Report summary;

•	Page header;

•	Page footer;

•	Master header;

•	Master data;

•	Master footer;

•	Detail header;

•	Detail Data;

•	Detail footer;

•	Subdetail header;

•	Subdetail data;

•	Subdetail footer;

•	Overlay;

•	Column header;

•	Group header;

•	Group footer;

•	Cross header;

•	Cross data;

•	Cross footer;

•	Child.

On a band you can place a rectangle object with a text, field of a database table, variables or any other report objects.

Before creating a report you need to make a decision about the kind of report you want.


Description of Report Objects

"Text" object

This object represents a framed rectangle with multi-line text inside it. You can set the frame type, color and width; all font attributes, text align and rotation.

In the memo of "Text" Object you can place multi-line text with variables, data fields or expressions. You can also attach this object to the DB memo field. This is an example of using variables, data fields and expressions:

Length, cm: [Length]

Length, cm: [Table1."Length_cm"]

Length, cm: [[Length_in_inches] * 2.54]

Length, cm: [Table1."Length_in" * 2.54]

The Object's editor allows you to edit memo contents, insert variables and DB fields into edited text, edit script contents, and set output format for used variables or DB fields. You can use the Insert key to insert a variable, Ctrl+Enter key  to close editor and Ctrl+F key to choose the format for used variables.

The Format editor allows you to set formatting for variables, used in the memo of the "Text" object. You can bring up this editor in the memo editor with the "Format" button, or in the context menu of  the "Text" object. The variable can be shown as a text string (with no formatting), as a numeric value, as a date, time or boolean value. For each formatting category you can choose one of several formatting strings (for example, you can set the number of digits in fractional part of a numeric value, and choose a long or short date format etc.). You also can set a custom format string for each category (for example, #,##0.000 for numeric value). Boolean values can be formatted by False_string;True_string string.

This format is implemented for each variable in the memo of the "Text" object. If the variable cannot be formatted, it is shown as text.

If you are using several variables in one object, but you want different formats for each variable, you can use in-place formatting with the "#" tag. Just put this tag and format string inside the variable brackets:

[Variable #format], where format is one of following values:

·	x.x or Nx.x or Nyyyyy - numeric formatting. x.x - length of number/number of digits in fraction part; yyyyy - string like #,##0.00. If x.x or yyyyy string contains ".", ",", "-" characters, last this character will be used as decimal separator.

·	Dxxxxx, Txxxxx - date and time. xxxxx - string like dd.mm.yy.

·	Bxxxxx;yyyyy - boolean formatting. If value is False, xxxxx string will be shown, otherwise yyyyy string will be shown.

These are some examples of using the "#" tag:

[Table1."N1" #9.2]   [Table1."N2" #N9-2]   [Table1."N3" #N#,##0.00] - numeric formatting

[Table1."Date1" #Ddd.mm.yyyy]   [Table1."Time" #Thh:mm:ss] - date/time formatting

[Table1."Bool1" #BFalse;True]   [Table1."Bool2" #BNo;Yes] - boolean formatting

You cannot use a format tag in the variables editor.

In the context menu of  the"Text" object you can set the following options:

·	"Stretched" - object has variable height depending on the actual number of text strings in it. You should also turn on this option in object's parent band. When this band is printed, it calculates the maximal height of objects with Stretched option and stretch itself.

·	"Word wrap" - long strings are wrapped onto several lines of text.

·	"Autosize" - before drawing, object calculates its actual height and width and stretches itself.

"Band" object

Report Builder is a banded report generator. All of its band are listed below.

Name	Functionality

Report title 	 	Prints once at the beginning of report

Report summary 	Prints once at the end of the report

Page header 	 	Prints at the top of each page

Page footer 	 	Prints at the bottom of each page

Master header 	Prints at the begin of master list

Master data 	 	Data rows of master list

Master footer 	 	Prints at the end of the master list

Detail header 	 	Prints at the begin of the detail list

Detail data 	 	Data rows of detail list

Detail footer 	 	Prints at the end of the detail list

Subdetail header 	Prints at the begin of the subdetail list

Subdetail data 	 	Data rows of the subdetail list

Subdetail footer 	 	Prints at the end of the subdetail list

Overlay 	 	Prints on each page as background

Column header 	 	Prints at the top of each column

Column footer 	 	Prints at the bottom of each column

Group header 	 	Prints at the beginning of each group

Group footer 	 	Prints at the end of each group

Cross header

Cross data

Cross footer	These bands are intended for creating cross-tab reports

There are several band editors (for data-band, group header, and cross-data bands).

The Data-band editor allows you to choose available dataset for the band or assign "virtual" dataset to it. When assigning a virtual dataset, you should set the number of records in it. When building a report, the band with a virtual dataset will be printed as many times as there are records in this dataset.

The Group header editor allows you to set grouping conditions based on the fields of the DB table, or in any expression.

In the context menu of "Band" object you can set the following options (depending of band type):

·	"Stretched" - band can stretch its height depending on the height of its child objects.

·	"Breaked" - band can break its content onto several pages or columns.

·	"Start new page" - when the band is printed, the report engine starts a new page. When the data-band has this option, a new page starts after printing all child bands of this band.

·	"On first page" - band prints on first page (page header & page footer only).

·	"On last page" - band prints on last page (page footer only).

·	"Repeat on subsequent pages" - prints band on each new page. This option is available for  Master header, Detail header, Subdetail header, Group header, Cross header bands.

"Picture" object

This object is intended for inserting pictures in your report. You can use BMP/WMF/ICO (and JPG, if available) graphic files. Object's editor allows you to choose a file with a picture and clear the picture’s contents. You can also use pictures from the BLOb field of the DB table. To do this, put a reference to this field into the memo of the object, for example: [Table1."GraphicField"]. Memo editor can be shown by pressing Ctrl+Enter key on "Picture" object or by Object inspector.

You can set the following options in the context menu of the object:

·	"Stretched" - picture is stretched to fill object's rectangle.

·	"Keep aspect ratio" - when stretched, picture keep its aspect ratio.

·	"Center" - picture will be printed at the center of object's rectangle.

"SubReport" Object

"SubReport" Object is intended for inserting nested reports in your report. This object is linked to another page of the report. When building a report, a linked page draws on the place of this object.

SubReport Objects can be placed side-by-side. If you want to place SubReport objects one-under another, spread it on separate data-bands. There is some limitation in using SubReports:

·	Don't use columns in subreports.

·	Don't use ReportTitle, ReportSummary, PageHeader, PageFooter, ColumnXXX bands.

·	Don't use breaked bands.

·	Don't use groups.

"Line" object

"Line" object is intended for inserting horizontal or vertical lines in your report. You can set the width and color of the line. There are easy to use tools for drawing lines in designer.


Designer

Designer description

DEKSI Network Inventory comes with a built in report designer, which is accessed by selecting the Report Bulder|Report Designer menu item. The designer allows quick and easy access to report designing and previewing reports. The designer was created with dockable panels (toolbars), which may be changed to suit the users taste. Information about the panels are kept in  memory while using the designer, when the designer is closed the tool bar properties are written to the Windows registry so they will be used when you re-enter the design window..

Using keyboard

·	Arrow keys – move to next object.

·	Ctrl + Arrowkeys - moves selected object(s) in direction of arrow.

·	Shift + Arrowkeys - increase or decrease dimension of selected object(s) in arrow direction.

·	Enter - brings up editor of selected object.

·	Del - delete selected object.

·	Ctrl + Enter - brings up memo editor of selected object.

·	Ctrl + 1..9 - sets frame thickness of selected object.

·	Ctrl + Z - undo last action.

·	Ctrl + Y - redo canceled action.

·	Ctrl + G - toggles grid on/off.

·	Ctrl + B - toggles align to grid option on/off.

·	Ctrl + F - turn object's framing off.

·	Ctrl + D - turn object's framing on.

·	Ctrl + X - cut to clipboard.

·	Ctrl + V - paste from clipboard.

·	Ctrl + C - copy to clipboard.

·	Ctrl + A - select all objects on Page.

·	Ctrl + N - create new empty report.

·	Ctrl + O - open report file.

·	Ctrl + S - save report file.

·	Ctrl + P - preview report.

Using mouse

·	Left click -  in Page window selects object; in visual component palette selects object to insert – after select LeftClick over Page window  inserts new object.

·	Right click – brings up context menu for selected object.

·	Double click – brings up default editor of the selected object. Double click over free space on Page brings up the Page option dialog, where you may set the Page options i.e. margins, size etc.

·	Shift + left click – toggle object's selection.

·	Ctrl + left click – draws selection rectangle. All object that fits in this rectangle will be selected after you release the mouse key.

·	To scale several selected objects, drag red square on the right-bottom corner of object's group.

Designer options

To set the default options for the report designer choose “Tools|Options” menu command. Here you can set the grid size, report measurement units: pixels, millimeters and inches. Grid size 18 pixels corresponds to 5mm.

You can also control how the selected object appears on screen, either frame or inverse color. If Colored Buttons is turned off, then all Buttons become black-white; Editing after insertion governs the default action when inserting objects as to whether the default editor for the object appears after insertion or not. If you are inserting a large amount of empty rectangles turn this option off.

Snap to grid snaps objects to the nearest grid point when moving them. Note: even though screen measurements may be in units other than mm, when setting margin sizes in the Page option they are still in mm.

Report variables

There are many reasons for using named Variables in reports, an example would be to create names for cryptic field names like n1 n2 n3 in an underlying data base. When looking at such names in a report design they don't make much sense and it would be much better to have something like LastName, MiddleName, FirstName to insert as an object than the cryptic names.

These variables can be more than just replacements for field names; they could be mathematical expressions like sums or rounded values, dates, time, string concatenation etc.

To work with a list of variables it is first necessary to create it. To show the available variable list, choose “File|Variable list” in the report designer's menu. If no variables are created, the left drop-down list of Variable categories will be empty and the variable list below it will be empty. The drop-down list on the right displays the available datasets and the window below shows available data fields of the selected dataset.

To create a variable list click on the “Variables” button at the bottom left of the variable List editor and the Variables list window appears as below.

In Variables list editor you should type categories and its variables in the following format:

CATEGORY1

  Variable1

  Variable2

^ space is required!

CATEGORY 2

  Variable 1

  Variable 2

etc.

You should define at least one category. When finished press Ok and you will be returned to the Variables editor.

The next step is to assign values to all created variables. To attach any variable to any data field select the variable name in the left hand list then select the desired datafield in the right hand list.

The drop-down list on the right displays the available datasets and the window below shows available data fields of the selected dataset. The last available category in the dataset drop-down list is the “Other”. When selecting it, you'll get access to the following data:

·	Page# (built-in function returns current Page number).

·	Expression allows creation of expression in the “Expression” textbox.

·	Date (built in function returns current date).

·	Time (built in function returns current time).

·	Line# (built in function returns current row number of report dataset).

·	Line through# (built-in function returns row through).

·	Column# (built-in function returns Column number).

·	TotalPages (built in function returns number of pages in report). To use this function, you should set “Two-pass report” option in the Report options dialog.

Report options

To set Report Options choose “File|Report option” from the designer's menu.

The dropdown list at the top of the dialog box lists all available printers in the system. If there is no printer available installed in your system you can select “Default printer” which allows you to use any paper dimension but it will be impossible to print. It will only allow you to work with a report in the designer and preview it.

If “Select when report loaded” option is checked then printer information is stored with the report and when this report is loaded that printer will automatically be selected. If that printer is not found on the system then the windows system default printer will be selected.

The “Two pass report” option must be checked if you need to use “total pages” function in the report, i.e. print “Page xx from yy”

.

When you select a printer the Page window in the report designer shows the available printable area for the Page size and printer selected.

Page options

To set the page options for the current page of report, choose “File|Page options” in designer's menu, or double click on an empty spot on the page.

You can select the paper format from the drop-down list of paper formats supported by the current printer. If the current printer supports custom paper sizes and you select custom from the list you will be able to enter the width and height of the custom size. Any other choice uses preset sizes. You may also choose the orientation for the Page. Note All printers may not support custom paper sizes,  (for example, printer driver “HP LaserJet 6L” does not support page dimensions less than 76 * 127 mm; printer driver “HP LaserJet 4L” does not support custom size at at all).

On “Margins” tab of dialog  you may select whether or not to use margins and the size of the margins. If the “Don't use” option is selected, no printable area border will be shown in the designer's Page window, and all the pages contents will be printed correctly on any printer, but object's sizes will be not the same on different printers.

If you leave the option unchecked and have all the margin settings at zero the pageborder will reflect the maximum printable area for the selected printer. You may find some chopping when you switch between reports designed for one printer to another, particularly between ink-jet and dot matrix. Ink-jet printers usually have a smaller printable area than a dot matrix due to the way they feed the paper.

If margins is set to non-zero values, the hash marked border will show in the report designer's page window.  If you use dot matrix printers, pay close attention to the printable area: some dot matrix printers will not print if the object to be printed overruns the printable area, others will produce pages with the over-run printed on them.  This obviously produces weird looking reports. In this case, you should set the margins manually.

On the “Options” tab of the dialog you may set more options for the page. You may set the number of columns across the page width and the space between them. If “Print on previous page” flag is set to true this will allow a new page to start printing on the unused space of the previous page.

Object Inspector

The Object Inspector allows you to manipulate some object properties: set object name, it's position, dimensions and visibility. Like the other toolbars, it may be shown or hided. To show Object inspector, choose “Tools|ToolBars|Object Inspector” in designer's menu. To shrink Object Inspector, double click on its title bar; double click again and it will expand.

Highlighting

For those reports  which you would like to have objects change their font color, background color etc. based on a specific condition or expression, click the "Highlight" button in the Text formatting toolbar.  This will bring up the “Highlight attributes” dialog where you may enter the conditions to be satisfied in the text box and select the various options available.

For example, assume it is necessary to pick out orders exceding  $1,000.00, Demo report 3- level is an example of this. To achieve this, select the rectangle containing sum order, click on the highlight button in the formatting toolbar. In the textbox of the dialog type the condition “Value > 1000” without quotes. Select appropriate font & background color then click Ok. Your report will now show any orders over $1000.00 highlighted with the chosen color. Try various combinations of font styles with background colors to achieve the results you need.

Preview description

·	Open file report: Ctrl+O, or click open button in toolbar.

·	Preserve report to file: Ctrl+S, toolbar button. The list box will display available formats.

·	Edit report: Ctrl+E, context menu

·	Add page: Insert, context menu. This command accessible.

·	Delete page: Delete, context menu. This command accessible.

·	Search text: Ctrl+F, toolbar button. Repeated search - F3.

·	Print report: Ctrl+P, toolbar button.

·	Change scale: click on scale button, context menu, spacebar.

·	Rightclick shows context menu.

·	Report navigation keys:

Scroll bars, Arrow keys - window scrolling;

Page Up, Page Down - up/down (large piece);

Ctrl+PageUp, PageDown,  Click  right lower corner - page up/down;

Home/End - depends on which scrollbar is active;

Ctrl + Home, End - go to beginning/end of report.


Creating Reports

SIMPLE REPORT

This is a simplest kind of report. For creating it, you should place the "Master data" band on the page, then place objects with appropriate data on it:

You also should connect "Master data" band to appropriate dataset

MASTER-DETAIL REPORT

For creating this report, place "Master data" and "Detail data" bands on the page, then place objects with appropriate data on these bands. It does not matter which order you place bands on the page - "Master data" band will be printed first.

If the appropriate detail list is empty, the master record will be skipped. If you don't want this, turn on the option "Print if detail empty" of the "Master data" band.

You can print a new master data on a new page - just turn on the "Start new page" option of the band.

MASTER-DETAIL-SUB-DETAIL REPORT

For creating this report, place "Master data", "Detail data" and "Sub-detail data" bands on the page, then place objects with appropriate data on these bands. All principles are likened to the Master-Detail report.

CROSS-TAB REPORT

This report is intended for printing table with variable number of columns. During report building, all off-bounds columns will be printed on new page (like in MS Excel).

For creating this report, place "Master data" and "Cross data" bands on the page. Place object in the cross of these bands. This object will be printed as the cell of cross-table. That's all! If you want, place "Cross header" and "Cross footer" bands in your report. The "Cross footer" band is usable if you want to print the sum of data in the row. The "Cross header" band can print on each page, if it has "Print on all pages" option.

REPORT WITH VARIABLE ROW HEIGHT

The Height of the data row may be variable in some reports. Example of this - bill, with long goods names.

DEKSI Network Inventory can print these reports. If the band has z variable height, you should turn on the "Stretched" option of the band. You also should turn on this option for all stretched objects in the band. If the calculated height of the band is smaller than its initial height, nothing happens. Otherwise, objects with this option will be stretched - its bottoms will be stretched to the band bottom.

REPORT WITH MULTIPLE DATA ROWS

DEKSI Network Inventory does not allow you to place two identical bands on the same page. Other than this - you can place many data-bands (master data, detail data, sub-detail data) and their headers & footers on the page. During report building, identical bands prints together. This allows you to create reports with data rows consisting of several identical data-bands (each of these bands can be of variable height). If the entire data row exceeds the bottom of page, it  prints at the next page.

MULTI-COLUMN REPORT

Set number of columns in "Page options" dialog in designer.

MULTI-PAGE REPORT

DEKSI Network Inventory can print reports consisting of several pages, e.g. title page and others. For adding and removing page, use toolbar buttons or menu of designer.

SUB-REPORT

Nested report is report with "Sub-report" object placed in it. "Sub-report" object is reference to the other report, placed in the other page. During report building, on the place of "Sub-report" an object appropriate report will be printed.

Sub-report objects can be placed side-by-side. If you want to place sub-report objects under one another, spread it on separate data-bands. There is some limitation of using sub-reports:

·	Don't use columns in subreports.

·	Don't use ReportTitle, ReportSummary, PageHeader, PageFooter, ColumnXXX bands.

·	Don't use breaked bands.

·	Don't use groups.

MASTER-DETAIL-DETAIL REPORT

For creating this report, place "Master data" and two "Detail data" bands on the page. Link all bands to the appropriate datasets. You can also create "Master-Detail-Detail-Detail", "Master-Master", "Master-Detail-SubDetail-SubDetail" reports etc.

REPORT WITH BREAKED BANDS

Let's create a simple report. It will contain two fields: first, named "Program", and second, named "Description". If we take a look at the created report, we see that page surface is not used  fully - there is a lot of empty space at the bottom of page. In our example we want to carry long memos onto the next page. This will be done, if the "Breaked" option of the band is set.

REPORT WITHOUT BANDS

If you want to print a free-form report, containing data from only one record, you cannot use bands. All the objects placed directly on page will be printed at their places.

REPORT WITH GROUPS

Groups used for grouping inventory data by some criteria. You can use any expression as group condition (usually used expression based on database fields). When this expression changes, DNI forms a new group.

For creating this report, place "Group header" and "Master data" bands on the page. Assign appropriate dataset to "Master data" band. In editor of "Group header" band type grouping expression. For example, to print customers list grouped on first letter of customer name, type the following expression: Copy([CustomerName], 1, 1), where [CustomerName] is referenced to the appropriate DB field.

Note: dataset used for "Master data" band should be sorted on the grouping condition. You can do this by using queries with an ORDER BY statement.

There is some limitations of using groups:

·	Don't use groups in the subreports.

·	Group can be top-level list only.


Build-in language

Using Interpreter

DEKSI Network Inventory has a built-in Pascal-like language interpreter. This interpreter is a powerful means of writing language-independent scripts which are used for building reports.

The language used in the interpreter is a Pascal dialect with the following capabilities:

·	operators: assignment operator; conditional statements, loop statements and unconditional jump: if...then...else, while...do, repeat...until, for..to..do, goto;

·	statement parentheses begin...end;

·	variables without type, arrays;

·	references to  properties and methods of DEKSI Network Inventory objects through dot notation.

Compared to Object Pascal this language is much simplified. The following simplifications are used:

·	all variables are of Variant type; there are no type definitions for variables;

·	all variables are global, there are no local variables;

·	there are no data types such as class, record, enumeration type etc.;

·	you cannot write your own procedures or functions;

·	there are no loop breaking operators (break, continue);

·	the number of arguments passed to a procedure or a function cannot exceed 3;

·	due to the fact that variables have no data type, data type control is unavailable; this should be taken into account when writing logical expressions;

·	arrays can only be one-dimensional.

Scripts and objects

Each object can have one or more code blocks. Script editing is done in the text editor window (to see the script you have to click the  button at the top of the window). The script runs each time before printing an object. (The script is attached to the OnBeforePrint property of the object).

Not only objects can have scripts. Bands and report pages are scriptable too. To call the band script you must open the OnBeforePrint property editor of the band (either from the Object inspector or by selecting the band and pressing Ctrl+Enter). To call the script of the report page you must open the OnBeforePrint property editor of the page (to do that you can click on an empty place on the page and call the editor from the Object inspector). Both Dialog Forms and Report Pages have scripts attached to their OnActivate property. All other object's scripts can be accessed from their Memo property or by pressing Ctrl+Enter.

Code writing

In scripts, you can use properties and methods of the report objects, database table fields and various constants. Also you can create variables and arrays accessible throughout the whole report. You can use procedures and functions as well.

Using variables

There is no need to specify  the "type" of variables, they all are variant. You can use Latin letters, digits and underline symbols in variable names. Variables from scripts can be used in objects and the variables from the list of variables can be used in scripts.

This is an example of using an intermediate variable:

begin

  Cust := [CustomerData.RepQuery."CustNo"];

  if FinalPass then

    TotalSales := Arr[Cust] else

    TotalSales := 0;

end;

In this example we create a variable Cust and set it equal to the database table field value.

You can also call variables defined in the data dictionary, system variables and user variables. In this case the variables' names might contain symbols that are not normally allowed by syntax rules (take Page# system variable for example). To call such variables you must use square brackets:

begin

  a := [Page#];

end

Referencing database fields

You can use references to database tables in your scripts. Here is the syntax of such a reference:

[FormName.TalbeName."FieldName"]

The full path is used when the table and the report are located on different forms (or data module). If the components are on the same form you can address them as [TableName."FieldName"].

You can just write ["FieldName"] if you address the table on which the band you are using is based. For example if you have master data band, which is connected to Customer.db table through a data source, you can refer to the fields of this table throughout the report using just the short path. Using the full path will not slow you down – DEKSI Network Inventory stores database field names in cache.

Arrays

Apart from variables you can also create arrays in your scripts. The arrays can only be one-dimensional but you can use their elements in the way that they will be treated as two-dimensional.

Example of using an array:

begin

  MyArr[0] := 'a'; MyArr[1] := 'b'; MyArr[3] := 'd';

  MyArr[2] := MyArr[0] + MyArr[1] + 'c' + MyArr[3];

end;

Actually the array elements' values are stored in the frVariables list in

Arr_array_name_index format. I.e. in the above example the contents of frVariables will be:

Arr_MyArr_0 := 'a'

Arr_MyArr_1 := 'b'

Arr_MyArr_2 := 'abcd'

Arr_MyArr_3 := 'd'

Constants

You can use constants in your scripts. A simple example is using numeric, string and logical constants:

begin

  a := 0;

  b := 'abcd';

  c := True;

  d := 'That''s all!';

end;

Pay attention to using single quotes inside string constants – like in Pascal, they have to be duplicated: d := 'That''s all!'.

Apart from simple constants you can use such constants as color names, font type names etc. Below is the list of available constants:

colors: clWhite, clBlack etc. – all standard colors + system colors;

dialog box response constants: mrNone, mrOk, mrCancel;

system: CRLF, Null;

font style types: fsBold, fsItalic, fsUnderline;

object frames: frftNone, frftRight, frftBottom, frftLeft, frftTop;

text alignment in a"Text" object: frtaLeft, frtaRight, frtaCenter, frtaVertical, frtaMiddle, frtaDown;

band aligning: baNone, baLeft, baRight, baCenter, baWidth, baBottom.

Besides these there are constants for add-in objects, for example, csCheck for "CheckBoxObject" objects. Anything  you can see in a drop-down property list box in the Object inspector can be used as a constant in scripts.

Referencing objects

You can reference a report's object's properties and methods in your scripts. Report objects are visual objects, control objects, bands, report pages and reports themselves. To reference an object dot notation is used, for example: Memo1.Text. To reference intrinsic properties and methods dot notation is not necessary.

Properties that can be referenced are shown in the Object inspector. Some combined properties like those of Font can be referenced by using  Font.Name, Font.Size etc.:

begin

  Memo1.Font.Name := 'Courier New';

  Memo1.Font.Size := 10;

  Memo1.Font.Color := clRed;

  Memo1.Font.Style := fsBold + fsItalic

end;

Properties such as TStrings (Memo, SQL, Items etc.) can be referenced by their index:

if Memo1.Lines[1] = 'a' then

  Memo1.Lines[1] := 'b'

Such properties can also be referenced using Add, Delete, Clear and Count:

if Memo1.Lines.Count > 10 then

  Memo1.Lines.Delete(10)

else

begin

  Memo1.Lines.Clear;

  Memo1.Lines.Add('a');

end;

A full list of object properties and methods can be found in the "Object properties and methods" paragraph. Please note that referencing a non-existent method or property will not cause an error message, so be careful when writing code.

Using procedures and functions

Scripts can contain procedures and functions calls. A peculiar property of the interpreter, or to be more precise the parser responsible for procedure/function processing, is that procedures and functions cannot have more that three arguments. Scripts can use both built-in procedures and external procedures defined in the project. The list of built-in procedures and functions is in the "Built-in procedures and functions" paragraph.

Note. When referencing a procedure or function there must not be a space between the procedure name and the opening bracket.

Objects modification

In your scripts you can make any modifications to objects, like changing size, color, contents, etc. You must remember that in a single pass report you cannot modify objects which have already been processed. If you try to change the contents of an object in the report title from an object lying on a report summary band there will be no changes. However, you will be able to make such a modification if you make a two-pass report.

It works the same way in multi-page reports. You can reference any object by its name (names within a report are unique). Only non-processed objects can be modified. If you still need to modify a project which has already been processed you will have to make a two-pass report.

Aggregate functions

Aggregate functions can be used in ReportSummary, PageFooter, MasterFooter, DetailFooter, SubdetailFooter, GroupFooter and CrossFooter bands.

·	Sum(<expression> [, band] [,1]). Calculates the sum of the values passed in <expression> for the band row given. If the band parameter is not set, sum defaults to all of the data values (on the bands MasterData,  DetailData and SubdetailData); otherwise a sum refers only to data on the named band. If the "1" parameter is used, the sum includes non-visible objects too. Example:

Sum([Part total], Band1);

Sum([[Part total] + [Part price]]);

Sum([Part total], Band1, 1).

·	Avg, Min, Max. Syntax is analogous to the Sum function. Function Avg calculates an arithmetic average, function Min returns minimum and function Max returns maximum value from  a row.

·	Count(<band>). Returns a count of data-rows. Example: Count(Band1).

String functions

·	Str(<value>).  Converts number given in value to a string.

·	Copy(<string>, <from>, <count>). Returns a substring of <string>  with length <count> characters , starting at <from>.

·	If(<expression>, <string1>, <string2>). Returns  string <string1>, if expression expression is true; otherwise returns <string2>.

·	FormatFloat(<formatstr>, <value>). Converts a numerically significant value in string, making use of the mask in formatstr.

·	FormatDateTime(<formatstr>, <value>). Converts a date/time value to a string, making use of the mask in <formatstr>.

·	StrToDate(<value>). Converts the string <value> to a date.

·	StrToTime(<value>). Converts the string <value> to a time.

·	UpperCase(<value>). Converts the string <value> to all upper case.

·	LowerCase(<value>). Converts the string <value> to all lower case.

·	NameCase(<value>). Converts the first character of string <value> to upper case and the remaining characters to lower case.

·	Length(<string>). Returns the length of  <string>.

·	Trim(<string>). Trims (removes) all spaces at the beginning and end of <string> and returns the result.

·	Pos(<substring>, <string>). Returns the position of <substring> in the given <string>.

Arithmetic functions

·	Int(<value>). Returns the whole part of the number <value>.

·	Frac(<value>). Returns the fractional part of the number <value>.

·	Round(<value>). Returns rounded number.

·	value1 Mod value2. Returns the remainder resulting from dividing <value1> by <value2>.

·	MinNum(<value1>, <value2>). Returns the smaller of the two values.

·	MaxNum(<value1>, <value2>). Return the greater of the two values.

Other functions

·	Input(<caption> [,<default>]). Shows a dialog window with the heading <caption> and an edit box.  If "default" parameter is set, puts this string into the edit box. After user clicks OK, returns the input string.

·	Date. Returns current system date.

·	Time. Returns current system time.

·	Line#. Returns the current Line number; counting begins at the beginning of each new group.  For example:

Master data

1. Detail data

2. Detail data

3. Detail data

Master data

1. Detail data

2. Detail data

LineThrough#. Returns the current Line number; counting begins at the beginning of the report.  For example:

Master data

1. Detail data

2. Detail data

3. Detail data

Master data

4. Detail data

5. Detail data

·	Column#. Returns the current column number in a cross-tab report.

·	Page#. Returns the current page number.

·	TotalPages. Returns the total number of pages in a completed report. To use of this function a report must be a two pass report.

·	DayOf(<date>). Returns day (1..31) of given date.

·	MonthOf(<date>). Returns month of given date.

·	YearOf(<date>). Returns year of given date.

·	MessageBox(<text>, <caption>, <buttons_and_icons>). Shows a message dialog window with text, caption and buttons. Returns a value that corresponds to the user's  selection (mrOk, mrCancel, mrYes, mrNo). Use the following values for the <buttons_and_icons> parameter:

Buttons	Icon

mb_Ok  	mb_IconError

mb_OkCancel  	mb_IconQuestion

mb_YesNo  	mb_IconInformation

mb_YesNoCancel 	 	mb_IconWarning

Procedures and functions that can be used during building a report

·	CurY. Returns the current Y position where the next band will be printed. You also can assign a value to CurY – it moves the current position accordingly. To convert pixels to millimeters and back, use the following ratio: 18 pixels = 5mm.

·	FreeSpace.Return space remaining in the page in pixels.

·	FinalPass. Returns true, if a report is two-pass and is now running the final pass.

·	PageHeight. Returns page height in pixels minus the height of the page footer band.

·	PageWidth. Return page width in pixels.

·	StopReport. Terminates report building.

·	NewPage. Starts a new page.

·	NewColumn. Starts a new column in a multi-column report.

·	ShowBand(<band>). Shows band named <band>.


 Creating reports

Before creating report you should make a decision about the kind of report want.

If you want to print a record per computer (like OS Report, BIOS Report, Motherboard Report) you should choose the “master-detail” report.

If you need to print multiple records per computer (like Printers Report, Disks Report) you should select the “master-detail-subdetail” report.

How to create General Report

This report will contain one record per computer; therefore it will be the “master-detail report”.

To create a new report you need to execute the following steps:

•	Select the Tools|Report Designer menu item;

•	Click on the “New report” button of the Report Designer toolbar.

•	Click on the “Insert band” button of the left-side toolbar and click on the report field.

•	In the opened Dialog window select the “Report Title” option.

•	Adjust the size of the recently created band and place a rectangle object on it.

•	In the opened dialog box enter Text: “General Report” and click OK.

•	You can center the text object and change its font and size

•	Place a new band on the report and select “Master data”.

•	In the “Band data source” dialog window select “Selected Departments” and click OK.

•	Place a rectangle object on the new band

•	In the text editor click on “Insert data field” button. Select tbl_Selected_Departments and the Department_Name field. Click OK.

•	Again place a new band on the report and select detail data.

•	In the “Band data source” dialog window select “Selected Computers” and click OK.

•	Place a rectangle object on this band. In the text editor click on “Insert data field” button. Select tbl_Selected_Computers and the Computer_Name field. Click OK.

•	In the same way you can add to the report fields of different database tables: tbl_Operating_Systems, tbl_BIOS, tbl_Motherboards and any other.

•	Once you completed creating the report, you can save the report and use it.

How to create a Printers Report with Report Builder

This report will contain multiple records per computer; therefore it will be the “master-detail-subdetail report”.

To create a new report you need to execute following steps:

•	Select the Tools|Report Designer menu item;

•	Click on the “New report” button of the Report Designer toolbar.

•	Click on the “Insert band” button of the left-side toolbar and click on the report field.

•	In the opened Dialog window select the “Report Title” option.

•	Adjust the size of the recently created band and place a rectangle object on it.

•	In the opened dialog box enter Text: “Printers Report” and click OK.

•	You can center the text object and change its font and size.

•	Place a new band on the report and select “Master data”.

•	In the “Band data source” dialog window select “Selected Departments” and click OK

•	Place a rectangle object on the new band

•	In the text editor click on “Insert data field” button. Select tbl_Selected_Departments and the Department_Name  field. Click OK.

•	Again place a new band on the report and select “detail data”.

•	In the “Band data source” dialog window select “Selected Computers” and click OK

•	Place a rectangle object on this band. In the text editor click on “Insert data field” button. Select tbl_Selected_Computers and the Computer_Name  field. Click OK.

•	Again place a new band on the report and select “subdetail data”.

•	In the “Band data source” dialog window select “Printers” and click OK

•	Place a rectangle object on this band. In the text editor click on “Insert data field” button. Select tbl_Printers and the Name  field. Click OK.

•	Place a rectangle object on this band. In the text editor click on “Insert data field” button. Select tbl_Printers and the Port  field. Click OK.

•	Once you completed creating the report, you can save the report and use it.